<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=0">

		<title>我的收藏</title>

		<link href="__PUBLIC__//AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css">
		<link href="__PUBLIC__//AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css">

		<link href="__PUBLIC__//css/personal.css" rel="stylesheet" type="text/css">
		<link href="__PUBLIC__//css/colstyle.css" rel="stylesheet" type="text/css">

	</head>

	<body>
		<!--头 -->
		<div class="center">
			<div class="col-main">
				<div class="main-wrap">

					<div class="user-collection">
						<!--标题 -->
						<!--<div class="am-cf am-padding">-->
							<!--<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">我的收藏</strong> / <small>My&nbsp;Collection</small></div>-->
						<!--</div>-->
						<!--<hr/>-->

						<div class="you-like">
							<!--<div class="s-bar">-->
								<!--我的收藏-->
								<!--&lt;!&ndash;<a class="am-badge am-badge-danger am-round">降价</a>&ndash;&gt;-->
								<!--&lt;!&ndash;<a class="am-badge am-badge-danger am-round">下架</a>&ndash;&gt;-->
							<!--</div>-->
							<div class="s-content">
								<volist name="goodsList" id="goods">
									<!--<a href="__APP__/Home/Goods/introduction?goods_id={$goods.goods_id}" >-->
									<div class="s-item-wrap" id="collect_goods_{$goods.collect_id}" >
										<div class="s-item">

											<div class="s-pic" align="center" onclick="jump('{$goods.goods_id}')">
												<a href="#" class="s-pic-link">
													<img src="{$goods.original_img}" alt="{$goods.goods_name}" style="width: 80px;padding: 20px 0;" title="{$goods.goods_name}" class="s-pic-img s-guess-item-img">
												</a>
											</div>
											<div class="s-info" onclick="jump('{$goods.goods_id}')">
												<div class="s-title"><a href="#" title="{$goods.goods_name}">{$goods.goods_name}</a></div>
												<div class="s-price-box">
													<span class="s-price"><em class="s-price-sign">¥</em><em class="s-value">{$goods.shop_price}</em></span>
													<!--<span class="s-history-price"><em class="s-price-sign">¥</em><em class="s-value">{$goods.market_price}</em></span>-->
												</div>
												<div class="s-extra-box">
													<span class="s-comment">好评: {$goods.favorable}%</span>
													<span class="s-sales">月销: {$goods.sales_sum}</span>
												</div>
											</div>
											<div class="s-tp" onclick="cancelCollect('{$goods.collect_id}')">
												<!--<span class="ui-btn-loading-before">找相似</span>-->
												<!--<i class="am-icon-shopping-cart"></i>-->
												<!--<span class="ui-btn-loading-before buy">加入购物车</span>-->
												<p>
													<a style="font-size: 14px;color: #ffad01" class="c-nodo J_delFav_btn">取消收藏</a>
												</p>
											</div>
										</div>
									</div>
									<!--</a>-->
								</volist>
							</div>
							<input type="hidden" id="goods_count" value="{$count}">
							<!--<div class="s-more-btn i-load-more-item" data-screen="0"><i class="am-icon-refresh am-icon-fw"></i>更多</div>-->

						</div>

					</div>

				</div>
		</div>

	</body>

</html>
<script type="text/javascript" src="__PUBLIC__/basic/js/jquery-1.7.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/AmazeUI-2.4.2/assets/js/amazeui.js"></script>
<script type="text/javascript" src="__PUBLIC__/layer/layer.js"></script>
<script type="text/javascript">
	$(function(){
	   var count = $('#goods_count').val();
	   if(count == '0'){
           modalInfo('您还没有收藏任何商品！',false);
	   }
	});
    function modalInfo(info,success){
        layer.msg(info);
//        if(success) {
//            , {icon: 1});
//        }else{
//            layer.msg(info, {icon: 2});
//        }

    }
    function cancelCollect(collect_id){
        $.ajax({
            type: "POST",
            url: "__URL__/ajaxCancelCollect",
            data: {
                collect_id: collect_id
            },
            dataType: "json",
            success: function (data) {
                modalInfo(data.message,data.success);
                if(data.success){
					$('#collect_goods_'+collect_id).hide();
                }
            },
			error:function(data){
                modalInfo('服务器错误',false);
			}
        });
    }

    function jump(goods_id){

        window.location.href = '__APP__/Home/Goods/introduction?goods_id=' + goods_id;

    }
</script>